<template>
  <div>
      <!-- 三级联动的全局组件 -->
      <TypeNav></TypeNav>
      <ListContainer></ListContainer>
      <TodayRecommend></TodayRecommend>
      <Rank></Rank>
      <Like></Like>
      <Floor v-for="floor in floorList" :key="floor.id" :floorList="floor"></Floor>
      <Brand></Brand>
  </div>
</template>

<script>
import ListContainer from "@/pages/home/ListContainer/ListContainer.vue"
import TodayRecommend from "@/pages/home/TodayRecommend/TodayRecommend.vue"
import Rank from "@/pages/home/rank/rank.vue"
import Like from "@/pages/home/Like/Like.vue"
import Floor from "@/pages/home/Floor/Floor.vue"
import Brand from "@/pages/home/Brand/Brand.vue"
import {mapState} from 'vuex'
export default {
  components: {
    ListContainer,
    TodayRecommend,
    Rank,
    Like,
    Floor,
    Brand,
  },
  mounted () {
    // 获取floor数据
    this.$store.dispatch("getFloorList");
  },
  computed: {
    ...mapState({
      floorList:state=>state.homeStore.floorList
    })
  }
}
</script>

<style>

</style>